package com.example.dolgi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
	Button btnAct1;
	Button btnAct2;
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		btnAct1 = (Button) findViewById(R.id.btnitem1);
		btnAct1.setOnClickListener(this);
		btnAct2 = (Button)findViewById(R.id.btnitem2);
		btnAct2.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.btnitem1:
				Intent intent = new Intent(this,Item1.class);
				startActivity(intent);
			break;
			case R.id.btnitem2:
				Intent intent2 = new Intent(this,Item2.class);
				startActivity(intent2); 
		default:
		break;
		}
	}
}